package io.openmessaging;

public class 版本问题 {
    public static void main(String[] args) {
        int start=1;
        int end=6;
        while(start<=end){
            int mid=(end-start)/2+start;
            if(start==end){
                System.out.println(end);
                break;
            }
            if(isBadVersion(mid)){
                end=mid;
                continue;
            }
            if(!isBadVersion(mid)){
                start=mid+1;
                continue;
            }

        }
        System.out.println("1");
    }

    public static boolean isBadVersion(int n){
        if(n>=1){
            return true;
        }
        return false;
    }
}
